﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Bastanteo.Domain.Representante>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Creacion
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Creacion</h2>

    <% using (Html.BeginForm("Crear", "Representante", FormMethod.Post)) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RepresentanteNumDoc) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RepresentanteNumDoc) %>
                <%: Html.ValidationMessageFor(model => model.RepresentanteNumDoc) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RepresentanteTipoDoc) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RepresentanteTipoDoc) %>
                <%: Html.ValidationMessageFor(model => model.RepresentanteTipoDoc) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RepresentanteNombre) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RepresentanteNombre) %>
                <%: Html.ValidationMessageFor(model => model.RepresentanteNombre) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RepresentanteApellidos) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RepresentanteApellidos) %>
                <%: Html.ValidationMessageFor(model => model.RepresentanteApellidos) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.CargoId) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("cargoCodigo", (IEnumerable<SelectListItem>)TempData["Cargos"]) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.ClienteId) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ClienteId) %>
                <%: Html.ValidationMessageFor(model => model.ClienteId) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.GrupoId) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("grupoCodigo", (IEnumerable<SelectListItem>)TempData["Grupos"]) %>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

